#include<bits/stdc++.h>
using namespace std;

int main()
{
	 string str,str1;
	 cin>>str;
	 int i=0;
	 while(str[i])
	 {
	 	if(str[i]>='0' && str[i]<='9')
	 		for(int j=0;j<(str[i]-'0')-1;j++)
	 		{
	 			str1+=str[i-1];
			 }
		else 
			str1+=str[i];
	 	i++;
	 }
	cout<<str1;
 }  
